GXStartPage
You can use theGXStartPage
function to print each page in a document if your application does not store each page as a single picture shape.
Boolean GXStartPage (gxJob aJob, long pageNumber, gxFormat aFormat, long numViewPorts, gxViewPort *viewPortList);
aJob
- A reference to the job object being printed.
pageNumber
The page number of the page being printed.aFormat
- A reference to the format object for the page.
numViewPorts
- The number of view ports contained in the
viewPortList
parameter.viewPortList
- A pointer to the list of references to view ports to use to capture shapes.
- function result
- Returns
true
if the page you specify in thepageNumber
parameter is within the user-specified page range,false
if the page you specify is not.DESCRIPTION
You use theGXStartPage
function to start printing the shapes drawn withGXDrawShape
. You call theGXStartPage
function after you call theGXStartJob
function.In the
GXStartPage
function, you specify in thepageNumber
parameter the page number of the page to print. QuickDraw GX compares the specified page number with the page range. TheGXStartPage
function returnstrue
if the page you specify is within the user-specified page range, and returnsfalse
if it is not. You can call theGXGetJobPageRange
function to determine the range of pages.In the
viewPortList
parameter, you specify the view ports to use to capture shapes. The part of the shape that is drawn through a view port is printed. In thenumViewPorts
parameter, you specify the number of view ports in theviewPortList
parameter.SPECIAL CONSIDERATIONS
After you finish calling theGXStartPage
function, you should immediately check for errors using theGXGetJobError
function. Only if no errors are returned should you draw the page's shapes and call theGXFinishPage
function.RESULT CODES
gxPrUserAbortErr The user has canceled printing. gxSegmentLoadFailedErr A required code segment could not be found, or there was not enough memory to load it. SEE ALSO
Listing 2-6 on page 2-23 shows how to use theGXStartPage
function to print each page of a document.The
GXDrawShape
function is discussed in the shape objects chapter of Inside Macintosh: GX Objects.View port objects are discussed in the view-related objects chapter of Inside Macintosh: GX Objects.
The
GXFinishPage
function is described in the next section. TheGXGetJobError
function is described on page 2-52. TheGXGetJobPageRange
function is described on page 2-62.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help